package org.dingfugui.triple.link.zk;

import org.dingfugui.triple.connection.Connection;

/**
 * @author fugui.ding at 2015/7/27
 */
public class ZookeeperConnection implements Connection {

    private Connection connection;
    private RemoteServerMetaData metaData;

    public ZookeeperConnection(Connection connection, RemoteServerMetaData metaData) {
        this.connection = connection;
        this.metaData = metaData;
    }

    @Override
    public byte[] read() {
        return connection.read();
    }

    @Override
    public void write(byte[] data) {
        connection.write(data);
    }

    @Override
    public void close() {
        connection.close();
    }

    @Override
    public boolean isClose() {
        return connection.isClose();
    }
}
